/**
* @(#)demo.test.book.advice.Test.java
* 南京中兴软创科技有限责任公司
* @date 2014-1-6
*/
package demo.test.book.advice;

import org.junit.Test;


/** 
 * 内部类 
 * @author <a href="tong.hao@zte.com.cn">童浩</a>
 * @version 1.0 
 * @since 2014-1-6 上午11:18:34 
 */

public class Main {
	@Test
	public void test1() {
		Integer i = new Integer(2);
		Integer j = new Integer(2);
		System.out.println(i < j);
		System.out.println(i == j);
		
		Sub b = new Sub();
		b.m();
		
		Sub.C1 c1 = b.new C1();
		c1.f();
		
		Sub.C2 x = new Sub.C2();
		x.f();
	}
	
	
}

class Base {
	
	public Base(int i) {}
	
	public void m(){
		System.out.println("base");
	}
}

class Sub extends Base {
	
	public int i = 3;
	public static int j = 4;
	
	public Sub() {
		super(1);
	}
	
	@Override
	public void m(){
		System.out.println("sub" + i);
	}
	
	class C1 {
		public void f(){
			System.out.println(Sub.this.i);
		}
	}
	
	static class C2 {
		public void f(){
			System.out.println("static:" + Sub.j);
		}
	}
}


